package main

import "fmt"

func main() {
	//var a =1
	//var b = 2
	//a, b := 1, 2
	//fmt.Println(a, b)
	//var a = 10
	//var b = 20

	// 常量的定义 iota 为自增
	//const a int = 10
	//const b = 20
	//const c = "abc"
	//const (
	//	male = iota
	//	female
	//)
	//fmt.Println(a, b, c, male, female)

	//var a = 10
	//var b = 5
	//fmt.Printf("AAA+%v,BBB+%v", a, b)

	//name := "小名"
	//age := 10
	//if name == "小名" || age == 16 {
	//	fmt.Println("对了")
	//
	//} else {
	//	fmt.Println("<UNK>")
	//}

	//for i := 0; i <= 10; i++ {
	//	fmt.Printf("%d ", i)
	//}

	//str := "123ABCabc一二三"
	//name := "小丽"
	//for i, value := range name {
	//	fmt.Printf("第%v位的ASCII值字=%v符是%c \n", i, value, value)
	//}

	//for i := 1; i <= 9; i++ {
	//	for j := 1; j <= i; j++ {
	//		fmt.Printf("%d*%d=%d ", i, j, i*j)
	//	}
	//	fmt.Printf("\n")
	//}

	//for i := 1; i <= 100; i++ {
	//	if i%5 == 0 {
	//		continue
	//	}
	//	if i%66 == 0 {
	//		break
	//	}
	//	fmt.Printf("%d\n", i)
	//}

	slice := []string{"gaomingchao", "liushuaixuan", "heruihao", "abc"}
	// fmt.Println(slice)
	// i 索引
	// v 当前值
	for v, i := range slice {
		fmt.Println("第", v, "次")
		fmt.Println(v, i)
	}

	//slice:=[]int{1, 2, 3, 4, 5, 6, 7}
	//func folter(slice []int, f processFunc) []int {
	//	var result []int
	//	fot _,value :=range slice{
	//		if f(value){
	//			result=append(result,value)
	//		}
	//}
	//return result
	//}
}
